app.config( function($routeProvider){

	
	$routeProvider
	  .when('/',
		{
		  templateUrl: APP_PATH + getUrl('/index/welcome'),
		  controller: 'AppCtrl'
		})
	  .when('/system',{
			templateUrl: APP_PATH  + getUrl('/system'),
			controller: 'SystemCtrl'
	  })
	  .when('/welcome',{
		  templateUrl: APP_PATH + getUrl('/index/welcome'),
		  controller: 'AppCtrl'
	  })
	  .when('/index/aboutus',
		{
		  templateUrl: APP_PATH + getUrl('/index/aboutus'),
		  controller: 'AboutusEditCtrl'
		})
	  .when('/index/contact',
		{
		  templateUrl: APP_PATH + getUrl('/index/contact'),
		  controller: 'ContactEditCtrl'
		})
	  .when('/index/clear',
		{
		  templateUrl: APP_PATH + getUrl('/index/clear'),
		  controller: 'CacheClearCtrl'
		})
	  .when('/index/config',
		{
		  templateUrl: APP_PATH + getUrl('/index/config'),
		  controller: 'ConfigEditCtrl'
		})
	  .when('/index/mail',
		{
		  templateUrl: APP_PATH + getUrl('/index/mail'),
		  controller: 'MailEditCtrl'
		})
	  .when('/index/mail_tip',
		{
		  templateUrl: APP_PATH + getUrl('/index/mail_tip'),
		  controller: 'MailEditCtrl'
		})
	  .when('/link',
		{
		  templateUrl: APP_PATH + getUrl('/link'),
		  controller: 'LinkCtrl'
		})
	  .when('/link/add',
		{
		  templateUrl: APP_PATH + getUrl('/link/add'),
		  controller: 'LinkAddCtrl'
		})
	  .when('/category',
		{
		  templateUrl: APP_PATH + getUrl('/category'),
		  controller: 'CategoryCtrl'
		})
	  .when('/category/add',
		{
		  templateUrl: APP_PATH + getUrl('/category/add'),
		  controller: 'CategoryAddCtrl'
		})
	  .when('/category/edit',
		{
		  templateUrl: APP_PATH + getUrl('/category/edit'),
		  controller: 'CategoryEditCtrl'
		})
	  .when('/post',
		{
		  templateUrl: APP_PATH + getUrl('/post'),
		  controller: 'PostIndexCtrl'
		})
	  .when('/post/recycle',
		{
		  templateUrl: APP_PATH + getUrl('/post/recycle'),
		  controller: 'PostRecycleCtrl'
		})
	  .when('/post/add',
		{
		  templateUrl: APP_PATH + getUrl('/post/add'),
		  controller: 'PostAddCtrl'
		})
	  .when('/post/edit',
		{
		  templateUrl: APP_PATH + getUrl('/post/edit'),
		  controller: 'PostEditCtrl'
		})
	  .when('/swiper',
		{
		  templateUrl: APP_PATH + getUrl('/swiper'),
		  controller: 'SwiperIndexCtrl'
		})
	  .when('/swiper/recycle',
		{
		  templateUrl: APP_PATH + getUrl('/swiper/recycle'),
		  controller: 'SwiperRecycleCtrl'
		})
	  .when('/swiper/add',
		{
		  templateUrl: APP_PATH + getUrl('/swiper/add'),
		  controller: 'SwiperAddCtrl'
		})
	  .when('/swiper/edit',
		{
		  templateUrl: APP_PATH + getUrl('/swiper/edit'),
		  controller: 'SwiperEditCtrl'
		})
	  .when('/image/crop',
		{
		  templateUrl: APP_PATH + getUrl('/image/crop'),
		  controller: 'ImageCropCtrl'
		})
	  .when('/image/cut',
		{
		  templateUrl: APP_PATH + getUrl('/image/cut'),
		  controller: 'ImageCutCtrl'
		})
	  .when('/user',{
		  templateUrl: APP_PATH + getUrl('/user'),
		  controller: 'UserCtrl'
	  })
	  .when('/user/join',{
		  templateUrl: APP_PATH + getUrl('/user/join'),
		  controller: 'UserJoinCtrl'
	  })
	  .when('/user/recycle',{
		  templateUrl: APP_PATH + getUrl('/user/recycle'),
		  controller: 'UserRecycleCtrl'
	  })
	  .when('/user/password',{
		  templateUrl: APP_PATH + getUrl('/user/password'),
		  controller: 'UserPasswordCtrl'
	  })
	  .when('/user/info',{
		  templateUrl: APP_PATH + getUrl('/user/info'),
		  controller: 'UserEditCtrl'
	  })
	  .when('/role/add',{
		  templateUrl: APP_PATH + getUrl('/rbac/addRole'),
		  controller: 'RoleAddCtrl'
	  })
	  .when('/user/add',{
		  templateUrl: APP_PATH + getUrl('/rbac/addUser'),
		  controller: 'UserAddCtrl'
	  })
	  .when('/user/edit',{
		  templateUrl: APP_PATH + getUrl('/user/edit'),
		  controller: 'UserEditCtrl'
	  })	  
	  .when('/feedback',{
		  templateUrl: APP_PATH + getUrl('/feedback'),
		  controller: 'FeedbackIndexCtrl'
	  })	  
	  .when('/feedback/reply',{
		  templateUrl: APP_PATH + getUrl('/feedback/reply'),
		  controller: 'FeedbackReplyCtrl'
	  })		  
	  .otherwise({
		redirectTo: function(routeParams,path,search){
		  console.log("未定义的路由");
		  console.log(routeParams);
		  console.log(path);
		  console.log(search);
		}
	  });	
} );